package cn.iocoder.yudao.framework.business.eligibility.controller;

import cn.iocoder.yudao.framework.business.eligibility.pojo.form.EligibilityApplySaveDTO;
import cn.iocoder.yudao.framework.business.eligibility.pojo.vo.EligibilityApplyCheckVO;
import cn.iocoder.yudao.framework.business.eligibility.pojo.vo.EligibilityApplyVO;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.validation.Valid;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Validated
public interface EligibilityApplyController<RESP extends EligibilityApplyVO, SAVE extends EligibilityApplySaveDTO> {

    @GetMapping("/check")
    @Operation(summary = "检查我的申请情况")
    CommonResult<EligibilityApplyCheckVO<RESP>> check();

    @PostMapping("/save")
    @Operation(summary = "创建或更新申请信息", description = "用于初次申请提交资料或审核不通过的情况重新提交资料")
    CommonResult<Long> apply(@Valid @RequestBody SAVE reqVO);

}
